//
//  LoadingViewController.m
//  Audit
//
//  Created by fenggu07 on 15/2/5.
//  Copyright (c) 2015年 cc. All rights reserved.
//

#import "LoadingViewController.h"
#import "LoginViewController.h"

@interface LoadingViewController ()

@end

@implementation LoadingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    UIView *view=[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
    
    UIImageView *bgView=[[UIImageView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
    
    bgView.image=[UIImage imageNamed:@"bg.jpg"];
    
    self.view=view;
    
    [self.view addSubview:bgView];
}

-(void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    
    [NSThread sleepForTimeInterval:2.0];
    
    [self login];
}

-(void)login
{
    LoginViewController *loginView = [[LoginViewController alloc] init];
    
    self.view.window.rootViewController=loginView;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
